package com.siyu.adapter.interfaceadapter;

/**
 * @Author: siyu
 * @CreateTime: 2024-10-07
 * @Version: 1.0
 */
public class PowerAdapter extends AC220 implements DC {

    private final AC220 ac220;

    public PowerAdapter(AC220 ac220) {
        this.ac220 = ac220;
    }

    public int output5V(){
        int adapterInput = ac220.outputAC220V();
        int adapterOutput = adapterInput / 44;
        System.out.println("使用 Adapter输入AC" + adapterInput + "V"+"输出DC"+adapterOutput +"V");
        return adapterOutput;
    }

    @Override
    public int output12V() {
        return 0;
    }

    @Override
    public int output24V() {
        return 0;
    }

    @Override
    public int output36V() {
        return 0;
    }
}
